package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 商户基本信息
 * </p>
 *
 * @author cnswhy
 * @since 2021-06-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_merch_search_type")
@ApiModel(value = "MerchSearchType", description = "商户基本信息")
@AllArgsConstructor
public class MerchSearchType extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户编号
     */
    @ApiModelProperty(value = "用户编号")
    @TableField("customer_id")
    @Excel(name = "用户编号")
    private Long customerId;

    /**
     * 商家状态1正常2待审核3审核不通过4禁用5删除6草稿
     */
    @ApiModelProperty(value = "商家状态1正常2待审核3审核不通过4禁用5删除6草稿")
    @NotNull(message = "商家状态1正常2待审核3审核不通过4禁用5删除6草稿不能为空")
    @TableField("status")
    @Excel(name = "商家状态1正常2待审核3审核不通过4禁用5删除6草稿")
    private Integer status;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "search_key", condition = LIKE)
    @Excel(name = "")
    private String searchKey;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "serarch_area", condition = LIKE)
    @Excel(name = "")
    private String serarchArea;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "search_radius", condition = LIKE)
    @Excel(name = "")
    private String searchRadius;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "search_type", condition = LIKE)
    @Excel(name = "")
    private String searchType;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "sett_date", condition = LIKE)
    @Excel(name = "")
    private String settDate;

    @ApiModelProperty(value = "")
    @Length(max = 255, message = "长度不能超过255")
    @TableField(value = "add_type", condition = LIKE)
    @Excel(name = "")
    private String addType;

    @ApiModelProperty(value = "")
    @TableField("count")
    @Excel(name = "")
    private Integer count;


    @Builder
    public MerchSearchType(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long createUser, Long updateUser, 
                    Long customerId, Integer status, String searchKey, String serarchArea, String searchRadius, 
                    String searchType, String settDate, String addType, Integer count) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.updateUser = updateUser;
        this.customerId = customerId;
        this.status = status;
        this.searchKey = searchKey;
        this.serarchArea = serarchArea;
        this.searchRadius = searchRadius;
        this.searchType = searchType;
        this.settDate = settDate;
        this.addType = addType;
        this.count = count;
    }

}
